package cn.tx.service.impl.annotation;

import java.lang.reflect.Method;

/**
 * @author: 可乐加糖
 * @create: 2023-03-20 11:11
 * @Description: 注解测试
 */
public class HelloKeyTest {

    @HelloKey("hello")
    public static void main(String[] args) throws NoSuchMethodException {
        Class cls = HelloKeyTest.class;
        Method method = cls.getMethod("main", String[].class);
        HelloKey helloKey = method.getAnnotation(HelloKey.class);
        System.out.println("TestHelloKey.main:" + helloKey);
        System.out.println("TestHelloKey.main:" + helloKey.value());
    }
}
